<template>
  <div class="step-list">
    <div class="item" :class="{'curr':index == stepList.step}" v-for="(item,index) in stepList.list" :key="index">
      <div class="step">
        <img :src="index == stepList.step ? item.iconCurr : item.icon" alt="">
      </div>
      <span class="text">{{index + 1}}.{{item.text}}</span>
      <span class="line" v-show="index !== 0"></span>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    stepList: {
      type: Object
    }
  },
  data() {
    return {
    }
  },
}
</script>
<style lang="scss" scoped>
.step-list {
  font-size: 0;
  text-align: center;
  .item {
    width: 200px;
    display: inline-block;
    font-size: 12px;
    position: relative;
    .step {
      display: flex;
      width: 100px;
      height: 100px;
      margin: 0 auto 20px;
      border-radius: 50%;
      border: 2px solid #ffefe5;
      align-items: center;
      justify-content: center;
    }
    .line {
      position: absolute;
      top: 50px;
      left: -45px;
      width: 90px;
      height: 2px;
      background: url("../../assets/step/line.png") no-repeat 0 0 / 100% 100%;
    }
    .text {
      font-size: 16px;
      color: #666;
    }
    &.curr {
      .step {
        background: #ffefe5;
      }
      .text {
        color: #fe6616;
      }
    }
  }
}
</style>
